export function initSysInfo () {
    if (!$.cookie('Version-Token')) {
        $.cookie('Version-Token', VERSION, {expires: 8, path: '/'});
    }
}

export function getByteLen(val) {
  var len = 0;
  for (var i = 0; i < val.length; i++) {
    var a = val.charAt(i);
    if (a.match(/[^\x00-\xff]/ig) != null) {
      len += 2;
    }
    else {
      len += 1;
    }
  }
  return len;
}